package constants;

public class Parameters {

	public final String IP_ADRESS;
	public final int PORT;
	public final int MAX_PLAYERS;
	public final int MIN_PLAYERS;
	public final int MAX_MOVES;
	
	private static Parameters instance = null;
	
	private Parameters(String iP_ADRESS, int pORT, int mAX_PLAYERS,int mIN_PLAYERS, int mAX_MOVES) {
		IP_ADRESS = iP_ADRESS;
		PORT = pORT;
		MAX_PLAYERS = mAX_PLAYERS;
		MIN_PLAYERS = mIN_PLAYERS;
		MAX_MOVES = mAX_MOVES;
	}
	
	public static Parameters createParameters(String iP_ADRESS, int pORT, int mAX_PLAYERS,int mIN_PLAYERS, int mAX_MOVES) {
		if(instance == null) {
			instance = new Parameters(iP_ADRESS, pORT, mAX_PLAYERS, mIN_PLAYERS, mAX_MOVES);
		}
		return instance;
	}
	
	public static Parameters getInstance() {
		return instance;
	}
}
